<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="../static/azxcrm/css/sendOrder.css"
	th:href="@{/azxcrm/css/sendOrder.css}" rel="stylesheet" />
<body>
<div class="sendOrder">
    <!-- 订单详情 -->
    <div class="add_order clearfix">
        <div class="addorder_left">派单</div>
        <div class="addorder_right">
            <a href="javascript:;" data-toggle="modal" data-target="#myModa2">订单流失</a>
<!--             onclick="flowSheet()" -->
        </div>
    </div>
    <!-- 订单详情 -->

    <!-- 订单号 -->
    <div class="customer_table2">
        <table class="table customer_table3">
                <tbody>
                    <tr class="table_phone2">                            
                        <td class="phone2">订单号</td>
                        <td th:text="${order.orderNum}"></td>                                                                                   
                        <td class="phone2">订单类型</td>
                        <td th:text="${order.typeName}"></td>                           
                    </tr>
                    <tr class="table_phone2">                            
                        <td class="phone2">客户</td>
                        <td th:text="${customerClue.customerName}"></td>                                                                                   
                        <td class="phone2">手机号码</td>
                        <td>18373954299</td>                           
                    </tr>
                    <tr class="table_phone2">                            
                        <td class="phone2">跟进客服</td>
                        <td th:text="${order.serviceUserName}"></td>                                                                                   
                        <td class="phone2">所在地</td>
                        <td th:text="${customerClue.customerProvince}==请选择?'':${customerClue.customerProvince}+'-'+${customerClue.customerCity}+'-'+${customerClue.customerArea}+'-'+${customerClue.customerAddressDetail}"></td>                           
                    </tr>
                    <tr class="table_phone2">                            
                        <td class="phone2">入住类型</td>
                        <td th:if="${customerClue.occupancyType} == 0">非本类型线索</td>
						<td th:if="${customerClue.occupancyType} == 1">长住</td>
						<td th:if="${customerClue.occupancyType} == 2">短住</td>      
						<td class="phone2">康复项目</td>
                        <td th:text="${customerClue.recureProject} == '' ? 非本类型线索 : ${customerClue.recureProject}"></td>                                                                             
                    </tr>
                    <tr class="table_phone2">                            
                        <td class="phone2">参加人数</td>
                        <td th:text="${customerClue.tourismScale} == 0?非本类型线索:${customerClue.tourismScale}"></td>                                                                             
                        <td class="phone2">旅游路线</td>
                        <td th:text="${customerClue.tourismRoute} == '' ? 非本类型线索 : ${customerClue.tourismRoute}"></td>                       
                    </tr>
<!--                     <tr class="table_phone2">                            
                        <td class="phone2">康复项目</td>
                        <td th:text="${customerClue.recureProject} == '' ? 非本类型线索 : ${customerClue.recureProject}"></td>                                                                                  
                    </tr> -->
                </tbody>
        </table>
    </div>
    <!-- 订单号 -->

    <!-- 历史记录 -->
    <div class="customer_table5">
        <h4 class="pos-rel">派单记录</h4>
        <div class="table_Height">    
            <table class="table table-bordered table5_record">
                <thead>
                    <tr class="table_name">
                        <th>派单时间</th>
                        <th>派单类型</th>
                        <th>关联业务员</th>
                        <th>保护期</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each="dis : ${dispatch}">
                        <td th:text="${dis.dispatchTime}"></td>
                        <td th:text="${dis.order.typeName}"></td>
                        <td th:text="${dis.user.userName}+'('+${dis.deptName}+')'"></td>
                        <td th:text="${dis.protectTime}"></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <!-- 历史记录 -->

    <!-- 参课记录 -->
    <div class="customer_table7">
        <h4 class="pos-rel">参课记录</h4>
        <div class="table_Height">  
            <table class="table table-bordered table5_record">
                <thead>
                    <tr class="table_name">
                        <th>参课时间</th>
                        <th>姓名</th>
                        <th>手机号码</th>
                        <th>部门</th>
                        <th>业务员</th>
                        <th>是否本人咨询</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each="customerAttendance : ${customerAttendanceList}">
						<td th:text="${customerAttendance.attendanceTime}"></td>
						<td th:text="${customerAttendance.attendCustName}"></td>
						<td th:text="${customerAttendance.cellphoneNum}"></td>
						<td th:text="${customerAttendance.dept.deptName}"></td>
						<td th:text="${customerAttendance.createBy}"></td>
						<td th:text="${customerAttendance.isOwnself} == 0?本人 : 代咨询"></td>
					</tr>
                </tbody>
            </table>
        </div>
    </div>
    <!-- 参课记录 -->

    <!-- 派单操作 -->
    <div class="send_order">
        <h4 class="pos-rel">派单操作</h4>
        <form  class="handing_label" id="form-dispatchDeptDetails-add">
            <div class="handing_left">
                <label class="label_intention" for="">选择订单派发部门：</label>
                <select class="label_select cms-form-select" name="deptId" id="deptId">
                    <option disabled="disabled" value="请选择线索类型" selected = "selected" >请选择部门</option>
                    <option th:each="deptList : ${dept}"
							th:value="${deptList.deptId}" th:text="${deptList.deptName}"></option>
                </select>
            </div>
            <input type="hidden" th:value="${order.orderId}" name="orderId" id="orderId">
            <input type="hidden" th:value="0" name="salesUserId" id="salesUserId">
            <div class="handing_btn">
            <input class="handing_btn_left" type="submit" th:value="确认派发">
        	</div>
       </form>
    </div>
    <!-- 派单操作 -->
</div>

<div class="modal fade" id="myModa2">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">       
            <!-- 模态框头部 -->
            <div class="modal-header">
                <h4 class="modal-title">发起流单 <span class="glyphicon glyphicon-remove-circle" data-dismiss="modal"></span></h4>
            </div>       
            <!-- 模态框主体 -->
            <div class="modal-body">
                <div class="g-refund">
                    <div class="g-tab-list">        
                        <div id="myTabContent" class="tab-content">              
                            <div class="tab-pane fade in active" id="s-tab-1">
                                <form id="orderLoss">
                                    <div class="form-group g-textarea clearfix"><label>*请填写订单流失原因：</label>
                                        <textarea class="form-control" rows="3" name="finalReason" style="resize:none"></textarea>
                                    </div>
                                
                                <div class="btn-group">
                                    <input type="submit" class="btn btn-warning dropdown-toggle" th:value="提交">
                                    <button type="button" class="btn btn-default dropdown-toggle cancle" data-dismiss="modal">取消</button>
                                </div>
                                </form>
                            </div>  
                        </div>
                    </div>
                </div>       
            </div>
         </div>
    </div>
</div>  
<div th:include="include::footer"></div>
	<!-- 操作处理 -->
	<script src="/js/jquery-ui-1.10.4.min.js"
		th:src="@{/js/jquery-ui-1.10.4.min.js}"></script>
	<script src="/ajax/libs//datapicker/bootstrap-datepicker.js"
		th:src="@{/ajax/libs//datapicker/bootstrap-datepicker.js}"></script>
	<script src="/azxcrm/module/order/dispatchDeptDetails.js"
		th:src="@{/azxcrm/module/order/dispatchDeptDetails.js}"></script>
</body>
</html>